package com.sj.contorller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sj.dao.SysUserDao;
import com.sj.model.SysUser;

@RestController
public class TestController {
	@Autowired
	private SysUserDao dao;

	@RequestMapping("/user")
	public SysUser user() {
		return dao.findById("1");
	}

	@RequestMapping("/alluser")
	public List<SysUser> alluser() {
		return dao.getall();
	}
}
